home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / SECDR13A.ZIP / RLDBIOS.ASM < prev    next >
Assembly Source File  |  1994-01-21  |  1KB  |  84 lines

  1.     TITLE    rldbios - 01.21.94  Large Model
  2.     .MODEL large
  3. rldbios_TEXT   SEGMENT WORD PUBLIC 'CODE'
  4.     ASSUME    CS:rldbios_TEXT
  5. ;
  6. ;rldbios(int,drive,head,track, strint)
  7. ;int rldbios(int cmd, int drive, int head,
  8. ;         int track, int sector,
  9. ;         int nsects, void *buffer);
  10. ;  (same as C++ biosdisk)
  11.  
  12. ;Function: to bypass SECDRV TSR (if installed) to "real" disk bios
  13.  
  14.     public firstbyte,rdbvect
  15. firstbyte label byte
  16. rdbvect label  dword
  17.      dw    0,0
  18.  
  19. i13rtnp dw     offset i13rtn
  20.  
  21. tsrstat db     0
  22.  
  23.     public    _rldbios
  24. _rldbios proc far
  25.     push    bp
  26.     mov    bp,sp
  27.     mov    ah,[bp+06h]
  28.     mov    al,[bp+10h]
  29.     les    bx,[bp+12h]
  30.     mov    cx,[bp+0Ch]
  31.     shr    cx,1
  32.     shr    cx,1
  33.     and    cl,0C0h
  34.     add    cl,[bp+0Eh]
  35.     mov    ch,[bp+0Ch]
  36.     mov    dh,[bp+0Ah]
  37.     mov    dl,[bp+08h]
  38.     pushf
  39.     cmp    byte ptr cs:tsrstat,0
  40.     jne    byptsr
  41.     popf
  42.     int    13h
  43. i13rtn:
  44.     cmp    byte ptr [bp+06h],08h
  45.     jne    l1350
  46.     mov    es:[bx],cx
  47.     mov    es:[bx+02h],dx
  48. l1350:
  49.     mov    al,ah
  50.     mov    ah,0
  51.     pop    bp
  52.     ret
  53.  
  54. byptsr:
  55.     push    cs
  56.     push    cs:i13rtnp
  57.     jmp    dword ptr cs:rdbvect
  58.  
  59.     public    _setrldb
  60. _setrldb label    far
  61.     push    bp
  62.     mov    bp,sp
  63.     push    ds
  64.     push    si
  65.     push    ax
  66.     mov    byte ptr cs:tsrstat,1
  67.     lds    si,[bp+06h]
  68.     mov    ax,ds:[si]
  69.     mov    word ptr cs:rdbvect,ax
  70.     mov    ax,ds:[si+2]
  71.     mov    word ptr cs:rdbvect+2,ax
  72.     nop
  73.     pop    ax
  74.     pop    si
  75.     pop    ds
  76.     pop    bp
  77.     ret
  78.  
  79. iretx:    iret
  80.  
  81. _rldbios endp
  82. rldbios_TEXT   ENDS
  83.     END
  84.